//
// Created by jiangpenghui on 2023/4/14.
//

#ifndef CMAKECXX_SECURITY_H
#define CMAKECXX_SECURITY_H

#include  <iostream>
#include <vector>

using namespace std;

class Security {
protected:
    enum {
        BASEID = 0
    };
public:
    virtual ~Security() {};

    virtual bool isA(int id) {
        return (id == BASEID);
    }
};

class Stock : public Security {
    // 定义类型别名
    typedef Security super;
protected:
    enum {
        OFFSET = 1, TYPEID = BASEID + OFFSET
    };
public:
    bool isA(int id) {
        return id == TYPEID || super::isA(id);
    }

};


#endif //CMAKECXX_SECURITY_H
